package org.shangrila.bme.eo;

import java.io.Serializable;
import java.math.BigDecimal;

import javax.persistence.*;
import java.util.Date;
import java.util.List;


/**
 * The persistent class for the bme_acception database table.
 * 
 */
@Entity
@Table(name="bme_acception")
@NamedQuery(name="BmeAcception.findAll", query="SELECT b FROM BmeAcception b")
public class BmeAcception implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	private String id;

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name="ACCEPT_DATE")
	private Date acceptDate;

	private String address;

	private BigDecimal amount;

	@Column(name="ANNEX_FLAG")
	private int annexFlag;

	@Column(name="CONT_NAME")
	private String contName;

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name="CREATE_TIME")
	private Date createTime;

	private String operator;

	
	private String remarks;

	private String status;

	@Column(name="SUPPLIER_ID")
	private String supplierId;

	//bi-directional many-to-one association to BmeContract
	@ManyToOne
	@JoinColumn(name="CONT_ID")
	private BmeContract bmeContract;

	//bi-directional many-to-one association to BmeAcceptionDetail
	@OneToMany(mappedBy="bmeAcception")
	private List<BmeAcceptionDetail> bmeAcceptionDetails;

	//bi-directional many-to-one association to BmePayrollDetail
	@OneToMany(mappedBy="bmeAcception")
	private List<BmePayrollDetail> bmePayrollDetails;

	public BmeAcception() {
	}

	public String getId() {
		return this.id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public Date getAcceptDate() {
		return this.acceptDate;
	}

	public void setAcceptDate(Date acceptDate) {
		this.acceptDate = acceptDate;
	}

	public String getAddress() {
		return this.address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public BigDecimal getAmount() {
		return this.amount;
	}

	public void setAmount(BigDecimal amount) {
		this.amount = amount;
	}

	public int getAnnexFlag() {
		return this.annexFlag;
	}

	public void setAnnexFlag(int annexFlag) {
		this.annexFlag = annexFlag;
	}

	public String getContName() {
		return this.contName;
	}

	public void setContName(String contName) {
		this.contName = contName;
	}

	public Date getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public String getOperator() {
		return this.operator;
	}

	public void setOperator(String operator) {
		this.operator = operator;
	}

	public String getRemarks() {
		return this.remarks;
	}

	public void setRemarks(String remarks) {
		this.remarks = remarks;
	}

	public String getStatus() {
		return this.status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public String getSupplierId() {
		return this.supplierId;
	}

	public void setSupplierId(String supplierId) {
		this.supplierId = supplierId;
	}

	public BmeContract getBmeContract() {
		return this.bmeContract;
	}

	public void setBmeContract(BmeContract bmeContract) {
		this.bmeContract = bmeContract;
	}

	public List<BmeAcceptionDetail> getBmeAcceptionDetails() {
		return this.bmeAcceptionDetails;
	}

	public void setBmeAcceptionDetails(List<BmeAcceptionDetail> bmeAcceptionDetails) {
		this.bmeAcceptionDetails = bmeAcceptionDetails;
	}

	public BmeAcceptionDetail addBmeAcceptionDetail(BmeAcceptionDetail bmeAcceptionDetail) {
		getBmeAcceptionDetails().add(bmeAcceptionDetail);
		bmeAcceptionDetail.setBmeAcception(this);

		return bmeAcceptionDetail;
	}

	public BmeAcceptionDetail removeBmeAcceptionDetail(BmeAcceptionDetail bmeAcceptionDetail) {
		getBmeAcceptionDetails().remove(bmeAcceptionDetail);
		bmeAcceptionDetail.setBmeAcception(null);

		return bmeAcceptionDetail;
	}

	public List<BmePayrollDetail> getBmePayrollDetails() {
		return this.bmePayrollDetails;
	}

	public void setBmePayrollDetails(List<BmePayrollDetail> bmePayrollDetails) {
		this.bmePayrollDetails = bmePayrollDetails;
	}

	public BmePayrollDetail addBmePayrollDetail(BmePayrollDetail bmePayrollDetail) {
		getBmePayrollDetails().add(bmePayrollDetail);
		bmePayrollDetail.setBmeAcception(this);

		return bmePayrollDetail;
	}

	public BmePayrollDetail removeBmePayrollDetail(BmePayrollDetail bmePayrollDetail) {
		getBmePayrollDetails().remove(bmePayrollDetail);
		bmePayrollDetail.setBmeAcception(null);

		return bmePayrollDetail;
	}

}